
try {
	if (moment) {
		Vue.filter('dataTimeFrom', function (value, formatString) {
			if (!value) {
				return "";
			}
			formatString = formatString || 'YYYY-MM-DD';
			// return moment(value).format(formatString); // value可以是普通日期 20170723
			return formatDateTime(value,formatString); // 这是时间戳转时间(毫秒)
		});
		
		Vue.filter('dataTestFormat', function (index, createtime) {
			var text = "测试" + nums[index] + "：";
			return text + moment(createtime).format("YYYY-MM-DD HH:mm:ss");
		});
		
		Vue.filter('dataTestNumberFormat', function (index, class_name, score) {
			return nums[index] + "、" + class_name + "(" + score + "分)";
		});
	}
	
} catch (e) {
	//console.info("未引入时间解析器");
}

Vue.filter('imgFrom', function (value) {
	if (!value) {
		return "";
	}
	console.log(value.split("|")[0]);
	return value.split("|")[0];
});

Vue.filter("sexFrom",function(value){
    if(value==0){
		return "男";
	}else if (value == 1) {
    	return "女";
	}else{
    	return "";
	}
});

/**
 * 返回
 */
Vue.prototype.back = function (){
	back();
};
